package cn.lzm.server.impl;

import cn.lzm.AjaxResult;
import cn.lzm.domain.Store;
import cn.lzm.mapper.StoreMapper;
import cn.lzm.server.IStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StoreServiceImpl implements IStoreService {
    @Autowired
    private StoreMapper storeMapper;
    @Override
    public Store selectOne(String name) {
        return null;
    }

    @Override
    public List<Store> selectAll() {
        return null;
    }

    @Override
    public AjaxResult addOne(Store store) {

        storeMapper.addOne(store);
        return AjaxResult.me().setSuccess(true).setMessage("恭喜你操作成功");
    }

    @Override
    public Store selectByProductId(Long id) {
        return storeMapper.selectByProductId(id);
    }
}
